/**
 * @ClassNameAdminServiceImpl
 * @Description TODO
 * @author 李嘉明
 * @Date 2021/1/14 19:51
 * Version 1.0
 */
package com.hdit.Admin.service;
import com.hdit.Admin.domain.Admin;
import com.hdit.Admin.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AdminServiceImpl implements  AdminService{
    @Autowired
    private AdminMapper adminMapper;
    @Override
    public int findAdminByName(Admin admin1) {
        Admin  admin = adminMapper.findAdminByName(admin1);
        if(admin==null){
            return 0;
        }
        if(admin1.getADMIN_PWD().equals(admin.getADMIN_PWD())){
            return 1;
        }
        return -1;
    }
}
